using UnityEngine;

namespace CinemaDirector
{
	[ExecuteInEditMode]
	public abstract class TimelineItem : MonoBehaviour
	{
		[SerializeField]
		protected float firetime = -1f;

		public float Firetime
		{
			get
			{
				return firetime;
			}
			set
			{
				firetime = value;
				if (firetime < 0f)
				{
					firetime = 0f;
				}
			}
		}

		public Cutscene Cutscene
		{
			get
			{
				return (!(TimelineTrack == null)) ? TimelineTrack.Cutscene : null;
			}
		}

		public TimelineTrack TimelineTrack
		{
			get
			{
				if (base.transform.parent == null)
				{
					return null;
				}
				TimelineTrack component = base.transform.parent.GetComponent<TimelineTrack>();
				if (component == null)
				{
				}
				return component;
			}
		}

		public virtual void Initialize()
		{
		}

		public virtual void Stop()
		{
		}
	}
}
